﻿<%@ Page Title="كل الموزعين" Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true" CodeFile="Distributers.aspx.cs" Inherits="Distributers" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
<%@ Register Src="~/CustomerInfo.ascx" TagName="CustomerInfo" TagPrefix="CI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="jqModal.css" rel="stylesheet" type="text/css" />

   <%-- <script src="jquery-1.3.2.min.js" type="text/javascript"></script>--%>
    <script src="jqModal.js" type="text/javascript"></script>
    <script type="text/javascript">

    function there() {

        $("#dialog").jqm({ modal: true }).jqmShow();


    }
    
      </script>
      <style type="text/css">
          .zr3 {
	background-image:url('images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
}
  .newzr3{
	background:  url('images/Untitled-2_03.png') right ;

	height:34px;
	 background-repeat:no-repeat;
	 float:left;
	 margin-top:-5px;
	 text-align: center;
	 padding-right:15px;
	 cursor:pointer;
	 font-family:Tahoma;
	 font-size:14px;
	 color:#003353;
	 text-decoration:none;
	 
}
.newzr3:hover{
	color: #00b4ff;
	background-image:url('images/Untitled-2ho_03.png');
	background-repeat:no-repeat;

} 
.he3{
	background-color:#fff;
	padding:5px;
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
        .jqmWindow {
    display: none;
    
    position: fixed;
    top: 17%;
    left: 50%;
    
    margin-left: -300px;
    width: 800px;
    
    background-color: #EEE;
    color: #333;
    border: 1px solid black;
    padding: 12px;
}

.jqmOverlay { background-color: #000; }

/* Fixed posistioning emulation for IE6
     Star selector used to hide definition from browsers other than IE6
     For valid CSS, use a conditional include instead */
* html .jqmWindow 
{
     position: absolute;
     top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
}
            </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="up1" runat="server" >
            <ContentTemplate>
            <table width="100%" style="padding:10px;" dir="rtl">
<tr>
   
<td style="padding:5px; width:130px;" >

    

    <asp:Label ID="Label4" CssClass="stylelabel3" runat="server" Text="كلمة البحث" 
        meta:resourcekey="Label4Resource1"></asp:Label>

    

</td>
<td style="padding:5px; width:200px;">
    <asp:TextBox ID="searchfield" runat="server" CausesValidation="True" 
        style="border:1px solid" Width="150px" 
        meta:resourcekey="searchfieldResource1"></asp:TextBox>

</td>
<td >

    
    
</td>

</tr>
<tr>
<td style="padding:5px; width:130px;">
    <asp:Label ID="Label5" CssClass="stylelabel3" runat="server" Text="موضع البحث" 
        meta:resourcekey="Label5Resource1"></asp:Label>
    </td>
<td style="padding:5px; width:200px;"> 
    <asp:DropDownList ID="DropDownList1" runat="server"
        style="border:1px solid;" Width="150px" 
        meta:resourcekey="DropDownList1Resource1">
        <asp:ListItem Selected="True" Value="0" meta:resourceKey="All" Text="الكل"></asp:ListItem>
        <asp:ListItem Value="address" meta:resourceKey="lbladress" Text="العنوان"></asp:ListItem>
        <asp:ListItem Value="distributer" meta:resourceKey="lblcname" Text="اسم الناشر"></asp:ListItem>
    </asp:DropDownList>
    </td>
<td>
    <asp:Button ID="Button1" runat="server" CssClass="zr3" 
        onclick="ImageButton1_Click"  Text="إبحث" 
        meta:resourcekey="Button1Resource1" />
    
    </td>
</tr>
<tr>

<td colspan="3">
    <asp:Label ID="Label1" runat="server" ForeColor="#FF3300" 
        Text="<%$ Resources:Resource, searchresult %>" Visible="False" 
        meta:resourcekey="Label1Resource1"></asp:Label>
    
    
    
    </td>
</tr>
<tr>
<td colspan="3" align="left">
<asp:LinkButton ID="newpub" CssClass="newzr3" runat="server" 
Text="موزع جديد" Height="19px" PostBackUrl="~/NewDistributer.aspx" 
        meta:resourcekey="newpubResource1"></asp:LinkButton>
</td>
</tr>
</table>
    <div dir="rtl">
       <div >

                <asp:GridView ID="GridView1" runat="server"
                    AutoGenerateColumns="False" Font-Bold="False" AllowPaging="True" 
                     onrowcreated="GridView1_RowCreated" GridLines="None" 
                    EnableModelValidation="True" meta:resourcekey="GridView1Resource1"  >
                    <PagerSettings FirstPageText="الاولى" LastPageText="الاخيرة"
                        NextPageText="التالى" PreviousPageText="السابق" />
                  
                    <Columns>
                        <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                            <HeaderTemplate>
                            <div >
                                <table class="tab3" >
                                    <tr>
                                    <td class="tabbone3" style="width:150px">
                                        
                                        <asp:Label ID="lblcname" runat="server" Text="اسم الجهة" meta:resourceKey="lblcname" />
                                            
                                        </td>
                                        <td class="tabbone3"style ="width:200px">
                                     
                                        <asp:Label ID="lbladress" runat="server" Text="العنوان" meta:resourceKey="lbladress" />
                                            
                                        </td>
                                        <td class="tabbone3" style ="width:60px">
                                     
                                        <asp:Label ID="lblcity" runat="server" Text="المدينة" meta:resourceKey="lblcity" />
                                            
                                        </td>
                                        <td class="tabbone3"style ="width:100px">
                                      
                                        <asp:Label ID="lbltype" runat="server" Text="الموقع الالكترونى" meta:resourceKey="lbltype" />
                                            
                                        </td>
                                        <td class="tabbone3" style ="width:150px">
                                      
                                        <asp:Label ID="lblphone" runat="server" Text="الهاتف" meta:resourceKey="lblphone" />
                                            
                                        </td>
                                        
                                     <td class="tabbone3"style ="width:50px">
                                  
                                     <asp:Label ID="lblshow" runat="server" Text="عرض" meta:resourceKey="lblshow" />
                                            
                                        </td>
                                       <td class="tabbone3"style ="width:50px">
                                  
                                     <asp:Label ID="EditLbl" runat="server" Text="تعديل" meta:resourceKey="lblEdit" />
                                            
                                        </td> 
                                             <td class="tabbone3"style ="width:50px">
                                  
                                     <asp:Label ID="lbldelete" runat="server" Text="حذف" meta:resourceKey="lbldelete" />
                                            
                                        </td>                                  
                                    </tr>
                                </table>
                                </div>
                            </HeaderTemplate>
                            <ItemTemplate>
                              
                                <asp:Panel ID="Panel9" runat="server" Direction="RightToLeft" 
                                    meta:resourcekey="Panel9Resource1">
                                    <table  class="tab3">
                                        <tr>
                                     <td class="adel3" style ="width:150px">
                                                <asp:Label  ID="co" runat="server" 
                                                    Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("distributer"))) %>' 
                                                    meta:resourcekey="coResource1" />
                                            </td>
                                            <td class="adel3"style ="width:200px">
                                                <asp:Label  ID="add" runat="server" 
                                                    Text='<%# String.Format("{0} ",Eval("address")) %>' 
                                                    meta:resourcekey="addResource1" />
                                            </td>
                                            <td class="adel3"style ="width:60px">
                                                <asp:Label ID="city" runat="server" Text='<%# Eval("city") %>' 
                                                    meta:resourcekey="cityResource1" />
                                            </td>
                                            <td class="adel3" style ="width:100px">
                                                <asp:Label ID="website" runat="server" 
                                                    Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("website"))) %>' 
                                                    meta:resourcekey="websiteResource1" />
                                            </td >

                                            <td class="adel3" style ="width:150px">
                                                <asp:Label  ID="phone" runat="server" 
                                                    Text='<%# String.Format("{0} , {1}",Eval("tele1"),Eval("tele2")) %>' 
                                                    meta:resourcekey="phoneResource1" />
                                            </td >
                                     
                                         <td class="adel3" style ="width:50px">
                                             <asp:LinkButton ID="display" CommandArgument='<%# String.Format("{0} , {1},{2},{3}", Eval("country"), Eval("longitude"),Eval("latitude"),Eval("email1")) %>'   runat="server" OnClick="display_Click" Text="عرض" meta:resourceKey="lblshow"></asp:LinkButton>    
                                            </td>
                                           
                                             <td class="adel3" style ="width:50px">
                                             <asp:LinkButton ID="Editlinkbtn"   runat="server" 
                                                     PostBackUrl='<%# "~/EditDist.aspx?id="+Eval("id").ToString() %>'  Text="تعديل" 
                                                     meta:resourceKey="Editlinkbtn"></asp:LinkButton>    
                                            </td>
                                            <td class="adel3" style=" width:50px">
                                                            <asp:LinkButton ID="delete" runat="server" 
                                                                CommandArgument='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("id"))) %>' 
                                                                meta:resourceKey="lbldeletelinkbutton" OnClick="delete_Click" Text="حذف" 
                                                                ToolTip='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("id"))) %>'></asp:LinkButton>
                                                        </td>
                                            
                                          
                                                                                        
                                            
                                           
                                                                                    </tr>
                                    </table>
                                   <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" 
                                                    ConfirmText="<%$ Resources:Resource, delconfirm %>" 
                                        TargetControlID="delete" Enabled="True" />
                                </asp:Panel>
                              
                            </ItemTemplate>
                        </asp:TemplateField>
                      
                    </Columns>
                </asp:GridView>
                
                </div>
               
               
                <div id="displays" runat="server" visible="False">
                <CI:CustomerInfo ID="CustomerInfo1" runat="server"   />
     </div>
     
    <asp:SqlDataSource ID="CusSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT * FROM [distributers]"></asp:SqlDataSource>
         </ContentTemplate>
       
          </asp:UpdatePanel>
</asp:Content>

